@extends('admin.container')

@section('c-head')
    <script type="text/javascript">
        var PAGE_DATA = {
            REST_API: {
                back_url: "{{route('admin.hot.word.index')}}", //返回地址
            },
            @if(isset($hot))
           DEFAULT: {
                name: "{{$hot->name}}",
                position: "{{$hot->position}}",
                link: "{{$hot->link}}",
                sort: "{{$hot->sort}}",
            },
            @else
            DEFAULT: null,
            @endif
        };
    </script>
@stop
@section('c-body')
    <div class="comm-title">
                <span class="title-msg" id="page-nav">
                        网站 > 热点词设置
                    </span>
    </div>
    <div class="comm-body">
        <form id="main-form" style="margin-top: 20px;" method="post" action="{{ $form }}">
            <input type="hidden" value="{{ csrf_token() }}" name="_token">
            @if(isset($hot))<input type="hidden" name="_method" value="PUT">@endif
            <div class="input-line">
                <div class="key-txt">
                    热点词:
                </div>
                <div class="right-val">
                    <input name="name" style="width:100%;" id="name"/>
                </div>
            </div>
            <div class="input-line">
                <div class="key-txt">
                    展示位置:
                </div>
                <div class="right-val">
                    <select id="position" name="classify" style="width:100%;">
                        <option>请选择</option>
                        <option value="1">热门搜索</option>
                    </select>
                </div>
            </div>
            <div class="input-line">
                <div class="key-txt">
                    链接地址:
                </div>
                <div class="right-val">
                    <input name="link" style="width:100%;" id="link"/>
                </div>
            </div>
            <div class="input-line">
                <div class="key-txt">
                    排序:
                </div>
                <div class="right-val">
                    <input name="sort" style="width:100%;" id="sort"/>
                </div>
            </div>
            <div class="input-line" style="height:40px;margin-top: 30px;">
                <div class="key-txt">
                </div>
                <div class="right-val">
                    <button id="submit-btn" type="button" class="am-btn am-btn-primary am-btn-lg">
                                <span style="display:block;">
                                    提交
                                </span>
                    </button>
                    <a id="cancel-btn" type="button" class="am-btn am-btn-default am-btn-lg">
                                <span style="display:block;">
                                    取消
                                </span>
                    </a>
                </div>
            </div>
        </form>
    </div>


    <script src="/assets/b2b/admin/js/libs/jquery.validate.min.js">
    </script>
    <script src="/assets/b2b/admin/js/libs/messages_zh.js">
    </script>
    <script src="/assets/b2b/admin/js/pages/24.js">
    </script>
@stop